<template>
  <div id=''>
    <p>{{ props.mVal }}</p>
    <button @click="editmVal">修改props的值</button>
    <p>绑定的值：props{{ mval }}</p>
  </div>
</template>

<script lang='ts'>
export default {
  name: 'vue',
}
</script>

<script lang='ts' setup>
import { ref } from 'vue';

const props = defineProps({
  mVal: Number
})
const mval = ref(props.mVal)
const emit = defineEmits(['updata:mVal'])
const editmVal = () => {
  emit('updata:mVal', 200)
}
</script>

<style lang='scss'></style>
